//热更新
threads.start(function(){
    const versionName = "热更新 V1.0";
    var  vipname="conglinchu1234"   //换成你的自定义账号 需和脚本云登录的一致
    const baseUrl = "http://www.laobing77.xyz/rgx/";
    var res = http.get(baseUrl + "codelist.php?user="+vipname).body.json();
    var a = [];
    try{
        var name = res[0].fileName;
        var a = name.slice(name.indexOf("V") + 1, name.indexOf(".j"));
        var ver = versionName.slice(versionName.indexOf("V"), versionName.length).replace(/\D/g, '');
        if (ver < a.replace(/\D/g, '')) {
      threads.start(function() {
        codePath = engines.myEngine().cwd() + "/main.js";
          files.write(codePath, http.get(baseUrl + "download.php?user="+vipname+"&name=" + name).body.string())
                 engines.execScriptFile(codePath);
                     toast("更新版本=>V"+a)
                     exit();
                    })
                } 
    } catch(e) {}
    
    })